Skip to content

test(FR-2639): add E2E regression for sToken login boundary routes#6865

Merged
graphite-app[bot] merged 1 commit into
mainfrom
04-22-test_fr-2639_add_e2e_regression_for_stoken_login_boundary_routes
Apr 24, 2026
Merged

test(FR-2639): add E2E regression for sToken login boundary routes#6865
graphite-app[bot] merged 1 commit into
mainfrom
04-22-test_fr-2639_add_e2e_regression_for_stoken_login_boundary_routes

Conversation

@nowgnuesLee
Copy link
Copy Markdown
Contributor

@nowgnuesLee nowgnuesLee commented Apr 22, 2026

Resolves FR-2639 and FR-2643 (under Stories FR-2626 / FR-2627, Epic FR-2616)

resolves #NNN (FR-MMM)

Checklist: (if applicable)

  • Documentation
  • Minium required manager version
  • Specific setting for review (eg., KB link, endpoint or how to setup)
  • Minimum requirements to check during review
  • Test case(s) to demonstrate the difference of before/after

Stack

Story 2/3 E2E regression for Epic FR-2616. Sits on top of the Story 2 (#6861) and Story 3 (#6864) implementation PRs.

Copy link
Copy Markdown
Contributor Author

nowgnuesLee commented Apr 22, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@nowgnuesLee nowgnuesLee force-pushed the 04-22-test_fr-2639_add_e2e_regression_for_stoken_login_boundary_routes branch from 2f4d85c to 08977bf Compare April 22, 2026 03:14
@nowgnuesLee nowgnuesLee changed the base branch from 04-22-feat_fr-2627_migrate_eduapplauncher_stoken_path_to_stokenloginboundary to graphite-base/6865 April 22, 2026 03:28
@nowgnuesLee nowgnuesLee force-pushed the 04-22-test_fr-2639_add_e2e_regression_for_stoken_login_boundary_routes branch from 08977bf to 658c9bd Compare April 22, 2026 03:44
@nowgnuesLee nowgnuesLee force-pushed the 04-22-test_fr-2639_add_e2e_regression_for_stoken_login_boundary_routes branch 2 times, most recently from 5dfc734 to 43f4e07 Compare April 22, 2026 09:03
@nowgnuesLee nowgnuesLee force-pushed the 04-22-test_fr-2639_add_e2e_regression_for_stoken_login_boundary_routes branch from 43f4e07 to a231db5 Compare April 22, 2026 09:18
@nowgnuesLee nowgnuesLee force-pushed the 04-22-test_fr-2639_add_e2e_regression_for_stoken_login_boundary_routes branch from a231db5 to 17f7358 Compare April 23, 2026 05:39
@nowgnuesLee nowgnuesLee changed the base branch from graphite-base/6865 to 04-22-feat_fr-2627_migrate_eduapplauncher_stoken_path_to_stokenloginboundary April 23, 2026 05:39
@nowgnuesLee nowgnuesLee marked this pull request as ready for review April 23, 2026 06:09
Copilot AI review requested due to automatic review settings April 23, 2026 06:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Playwright E2E regressions for the new STokenLoginBoundary behavior across LoginView and EduAppLauncher routes, and updates the FR-2616 spec metadata to link the relevant implementation/testing PRs.

Changes:

  • Add E2E coverage for sToken boundary behavior on / and /interactive-login (invalid token UI + URL preservation; non-sToken path still shows login form).
  • Add E2E coverage for sToken boundary behavior on /edu-applauncher and /applauncher, including a regression guard ensuring LMS envelope params reach token_login.
  • Extend the draft spec metadata to record PR numbers/URLs and updated notes for Story 2/3.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
e2e/auth/stoken-login.spec.ts New regression E2E for LoginView sToken boundary error/URL behavior and non-sToken passthrough.
e2e/app-launcher/edu-applauncher-stoken.spec.ts New regression E2E for EduAppLauncher sToken boundary + POST body forwarding assertions via route mocks.
.specs/draft-stoken-login-boundary/metadata.json Adds PR linkage metadata and updates spec notes for FR-2616 story tracking.

Comment thread e2e/auth/stoken-login.spec.ts
Comment thread e2e/app-launcher/edu-applauncher-stoken.spec.ts
Comment thread e2e/app-launcher/edu-applauncher-stoken.spec.ts
@nowgnuesLee nowgnuesLee force-pushed the 04-22-feat_fr-2627_migrate_eduapplauncher_stoken_path_to_stokenloginboundary branch from 41da011 to 7fba64c Compare April 23, 2026 07:57
@nowgnuesLee nowgnuesLee force-pushed the 04-22-test_fr-2639_add_e2e_regression_for_stoken_login_boundary_routes branch from 17f7358 to a1a4a7a Compare April 23, 2026 07:57
@nowgnuesLee nowgnuesLee force-pushed the 04-22-feat_fr-2627_migrate_eduapplauncher_stoken_path_to_stokenloginboundary branch from 7fba64c to 907c539 Compare April 23, 2026 08:02
@nowgnuesLee nowgnuesLee force-pushed the 04-22-test_fr-2639_add_e2e_regression_for_stoken_login_boundary_routes branch 2 times, most recently from 6f5b6cd to abeb16c Compare April 23, 2026 08:35
@nowgnuesLee nowgnuesLee force-pushed the 04-22-feat_fr-2627_migrate_eduapplauncher_stoken_path_to_stokenloginboundary branch from 907c539 to 87f643c Compare April 23, 2026 08:35
Copy link
Copy Markdown
Member

@yomybaby yomybaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Apr 23, 2026

Merge activity

@graphite-app graphite-app Bot changed the base branch from 04-22-feat_fr-2627_migrate_eduapplauncher_stoken_path_to_stokenloginboundary to graphite-base/6865 April 23, 2026 10:37
graphite-app Bot pushed a commit that referenced this pull request Apr 23, 2026
…ary (#6864)

Resolves FR-2641, FR-2642 (under Story [FR-2627](https://lablup.atlassian.net/browse/FR-2627), Epic [FR-2616](https://lablup.atlassian.net/browse/FR-2616))

## Summary

Story 3 of Epic FR-2616: route `/edu-applauncher` and `/applauncher` now authenticate through `STokenLoginBoundary` before `EduAppLauncher` mounts. `_token_login` and the manual `backend-ai-connected` dispatch are removed from the component.

### Scope

- **Route wrapping** (`react/src/routes.tsx`): both edu-app routes read `sToken` via `useSToken()` and URL params via `useQueryStates(eduAppExtraParamSpec)`, then wrap `EduAppLauncherPage` with `STokenLoginBoundary`. The URL is intentionally not stripped on success (the launcher still passes `sToken` prop through for `eduApp.get_user_credential` and other params drive the launch sequence).
- **`EduAppLauncher` cleanup** (`react/src/components/EduAppLauncher.tsx`):
  - Removed `_token_login()` method and the URL parsing it owned.
  - Removed the manual `document.dispatchEvent(new CustomEvent('backend-ai-connected'))` call (the boundary now dispatches this exactly once).
  - **Removed the `auth` stage from `EduAppLaunchStage`** — authentication is no longer represented in the launcher's state machine or its stepper UI. Since the boundary runs `connectViaGQL` before `EduAppLauncher` mounts, the component always starts with a fully authenticated client.
  - **Deleted `_prepareProjectInformation()`** — `connectViaGQL` already populates `groups` / `groupIds` / `current_group` / `current_group_id` with a superset of the fields this helper fetched.
  - Proxy URL attach (`_attachProxyURL`) remains but is no longer labeled "auth"; failures now surface under the session step.
  - The stepper UI drops from 3 steps to 2 (`Preparing Session` → `Launching App`).
- **`extraParams` allowlist** (`react/src/routes.tsx:eduAppExtraParamSpec`): added `api_version`, `date`, `endpoint`. These are part of the LMS signing envelope forwarded with `sToken` in the old URL-scan based `_token_login`; the nuqs migration replaced the scan with an explicit allowlist and had dropped them, causing manager-side auth hooks that validate the signature against these fields to reject `token_login` as tampered.

## Test plan

- [x] `bash scripts/verify.sh` → `ALL PASS`
- [ ] Manual: launch from LMS URL `/edu-applauncher?sToken=<signed>&app=jupyterlab&api_version=...&date=...&endpoint=...&session_id=...` and confirm:
  - `POST /server/token-login` body contains all extra keys (check DevTools Network tab)
  - Stepper shows 2 steps ("Preparing Session", "Launching App") — no "Authentication" step
  - Successful launch opens the app in a new tab
- [ ] Regression scenarios covered by PR #6865 E2E: with / without `session_id`, invalid sToken surfaces stepper-integrated error

**Checklist:**

- [ ] Documentation
- [ ] Minium required manager version
- [ ] Specific setting for review (eg., KB link, endpoint or how to setup)
- [x] Minimum requirements to check during review
- [x] Test case(s) to demonstrate the difference of before/after

## Stack

Story 3 of Epic FR-2616. See [dev plan](../blob/main/.specs/draft-stoken-login-boundary/dev-plan.md) for the full story breakdown.

[FR-2627]: https://lablup.atlassian.net/browse/FR-2627
[FR-2616]: https://lablup.atlassian.net/browse/FR-2616
@nowgnuesLee nowgnuesLee force-pushed the 04-22-test_fr-2639_add_e2e_regression_for_stoken_login_boundary_routes branch from abeb16c to d650bff Compare April 24, 2026 07:30
@nowgnuesLee nowgnuesLee changed the base branch from graphite-base/6865 to main April 24, 2026 07:30
@github-actions github-actions Bot added size:XL 500~ LoC and removed size:L 100~500 LoC labels Apr 24, 2026
…6865)

Resolves FR-2639 and FR-2643 (under Stories [FR-2626](https://lablup.atlassian.net/browse/FR-2626) / [FR-2627](https://lablup.atlassian.net/browse/FR-2627), Epic [FR-2616](https://lablup.atlassian.net/browse/FR-2616))

resolves #NNN (FR-MMM)
<!-- replace NNN, MMM with the GitHub issue number and the corresponding Jira issue number. -->

<!--
Please precisely, concisely, and concretely describe what this PR changes, the rationale behind codes,
and how it affects the users and other developers.
-->

**Checklist:** (if applicable)

- [ ] Documentation
- [ ] Minium required manager version
- [ ] Specific setting for review (eg., KB link, endpoint or how to setup)
- [ ] Minimum requirements to check during review
- [ ] Test case(s) to demonstrate the difference of before/after

## Stack

Story 2/3 E2E regression for Epic FR-2616. Sits on top of the Story 2 (#6861) and Story 3 (#6864) implementation PRs.

[FR-2626]: https://lablup.atlassian.net/browse/FR-2626?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[FR-2627]: https://lablup.atlassian.net/browse/FR-2627?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[FR-2616]: https://lablup.atlassian.net/browse/FR-2616?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
@graphite-app graphite-app Bot force-pushed the 04-22-test_fr-2639_add_e2e_regression_for_stoken_login_boundary_routes branch from d650bff to d7fb3b2 Compare April 24, 2026 07:48
@graphite-app graphite-app Bot merged commit d7fb3b2 into main Apr 24, 2026
8 checks passed
@graphite-app graphite-app Bot deleted the 04-22-test_fr-2639_add_e2e_regression_for_stoken_login_boundary_routes branch April 24, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants